package com.firexxx;

import com.sun.tools.javac.code.Type;

import java.io.Serializable;
import java.lang.System;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.AbstractQueue;
import java.util.ArrayList;
import java.util.concurrent.ArrayBlockingQueue;

public class Main<T1 extends String, T3> {

    @Target(ElementType.TYPE_USE)
    @Retention(RetentionPolicy.SOURCE)
    private @interface ToJsonString {
    }

    private interface CI1 {
        void add();
    }

    private abstract class AbsCI1 implements CI1 {
        public abstract void add();
    }

    static class Parent<T1> {
        public void setT(T1 t) {
            System.out.println("parent");
        }
    }

    static class Child1 extends Parent<String> {
//        public void setT(Object t) {
//            System.out.println("child");
//        }

        public void setT(String t) {
            System.out.println("child");
        }
    }

    static class Child11 extends Parent<String> {
//        public void setT(Object t) {
//            System.out.println("child");
//        }
    }

    static class Child2<T8 extends String> extends Parent<T8> {
//        public void setT(Object t) {
//            System.out.println("child");
//        }

        public void setT1(T8 t) {
            System.out.println("child");
        }
    }

    static class Parent1<T1 extends String> {
        public void setT(T1 t) {
            int a = 1;
            String aa = a;
            System.out.println("parent");
        }
    }

    static class Child2222 extends Parent1<Integer> {
//        public void setT(Object t) {
//            System.out.println("child");
//        }

        public void setT(String t) {
            System.out.println("child");
        }
    }

    static class Child222<T8 extends String> extends Parent1<T8> {
//        public void setT(Object t) {
//            System.out.println("child");
//        }

        public void setT(String t) {
            System.out.println("child");
        }
    }

    static class Child22<T8 extends Integer> extends Parent1<T8> {
//        public void setT(Object t) {
//            System.out.println("child");
//        }

        public void setT(String t) {
            System.out.println("child");
        }
    }

    static class Child3<T8 extends String> extends Parent {
//        public void setT(Object t) {
//            System.out.println("child");
//        }

        public void setT(String t) {
            System.out.println("child");
        }
    }

    private interface CI2 {

    }

    {
//        Test.a = "22";
//        Test.b = "22";
        Main.sa2 = "33";

        Integer aaaaa = 1;

        ArrayList<String> abbbb = new ArrayList<String>();
        abbbb.add("1111");
        {
            abbbb.add("1111");
            int a = true ? 1 : 2;
//            a3 = 2;
        }
    }

    static {
        int a = 1;
    }

    private <T6> String fun(T6 t) {
        t.toString();
        String aa = "aa";
        aa = aa.equals("aa") ? aa : "11";
        return aa + "11" + aa;
    }

    private @ToJsonString String a1 = "1";
    public static String sa1 = new String("1");
    private static String sa2 = new String("1");
    private int a3 = 1;
    private static String sa3 = sa1;
    private Main<String, String> mm = null;

    static class Inner<T4 extends String> extends ArrayBlockingQueue implements Serializable {

        public Inner(int capacity) {
            super(capacity);

            synchronized (Inner.class) {
                int a = 1;
            }
        }
    }

    @FunctionalInterface
    interface printable{
        void print(String str);
    }

    public static void print(printable pri)
    {
        pri.print("helloworld");
    }

    public static void main(String[] args) {
//        a3 = 10;
        int alocal = 1;
        {
            int alocallocal = 1;
        }
        if ("1" instanceof String) {

        }
        print(System.out::println);
        Inner<String> a1 = new Inner(1);
//        Inner<? super String> a11 = new Inner();
//        Inner<? super String>[] a = new Inner[1];
//        Inner<String>[] aaa = new Inner<String>[1];

        Parent parent = new Child11();
        parent.setT("1");
    }
}
